home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / enter-2004-01.iso / files / maxima-5.9.0.exe / {app} / info / maxima.info-4 < prev    next >
Encoding:
GNU Info File  |  2003-02-09  |  48.9 KB  |  1,153 lines

  1. This is maxima.info, produced by makeinfo version 4.1 from maxima.texi.
  2.  
  3.    This is a Texinfo Maxima Manual
  4.  
  5.    Copyright 1994,2001 William F. Schelter
  6.  
  7. START-INFO-DIR-ENTRY
  8. * Maxima: (maxima).     A computer algebra system.
  9. END-INFO-DIR-ENTRY
  10.  
  11. 
  12. File: maxima.info,  Node: Definitions for Input and Output,  Prev: PLAYBACK,  Up: Input and Output
  13.  
  14. Definitions for Input and Output
  15. ================================
  16.  
  17.  - Variable: %
  18.      The last D-line computed by MACSYMA (whether or not it was printed
  19.      out).  (See also %%.)
  20.  
  21.  
  22.  - Variable: %%
  23.      The value of the last computation performed while in a
  24.      (MACSYMA-BREAK).  Also may be used in compound statements in the
  25.      nth statement to refer to the value of the (n-1)th statement.  E.g.
  26.      F(N):=(INTEGRATE(X^N,X),SUBST(3,X,%%)-SUBST(2,X,%%)); is in essence
  27.      equivalent to F(N):=BLOCK([%%], %%:INTEGRATE(X^N,X),
  28.      SUBST(3,X,%%)-SUBST(2,X,%%)); This will also work for communicating
  29.      between the (n-1)th and nth (non-atomic) BLOCK statements.
  30.  
  31.  
  32.  - Variable: %EDISPFLAG
  33.      default: [FALSE] - if TRUE, MACSYMA displays %E to a negative
  34.      exponent as a quotient, i.e. %E^-X as 1/%E^X.
  35.  
  36.  
  37.  - Function: %TH (i)
  38.      is the ith previous computation.  That is, if the next expression
  39.      to be computed is D(j) this is D(j-i).  This is useful in BATCH
  40.      files or for referring to a group of D expressions.  For example,
  41.      if SUM is initialized to 0 then FOR I:1 THRU 10 DO SUM:SUM+%TH(I)
  42.      will set SUM to the sum of the last ten D expressions.
  43.  
  44.  
  45.  - special symbol: "?"
  46.      - As prefix to a function or variable name, signifies that the
  47.      function or variable is a LISP token, not a MACSYMA token.  Two
  48.      question marks typed together, ??, will flush the current MACSYMA
  49.      command line.
  50.  
  51.  
  52.  - Variable: ABSBOXCHAR
  53.      default: [!] is the character used to draw absolute value signs
  54.      around expressions which are more than a single line high.
  55.  
  56.  - Function: APPENDFILE (filename1, filename2, DSK, directory)
  57.      is like WRITEFILE(DSK,directory) but appends to the file whose
  58.      name is specified by the first two arguments.  A subsequent
  59.      CLOSEFILE will delete the original file and rename the appended
  60.      file.
  61.  
  62.  
  63.  - Function: BACKUP ()
  64.      To "back up" and see what you did, see PLAYBACK.
  65.  
  66.  
  67.  - Function: BATCH (file-specification)
  68.      reads in and evaluates MACSYMA command lines from a file - A
  69.      facility for executing command lines stored on a disk file rather
  70.      than in the usual on-line mode. This facility has several uses,
  71.      namely to provide a reservoir for working command lines, for
  72.      giving error-free demonstrations, or helping in organizing one's
  73.      thinking in complex problem-solving situations where modifications
  74.      may be done via a text editor.  A batch file consists of a set of
  75.      MACSYMA command lines, each with its terminating ; or $, which may
  76.      be further separated by spaces, carriage- returns, form-feeds, and
  77.      the like.  The BATCH function calls for reading in the command
  78.      lines from the file one at a time, echoing them on the user
  79.      console, and executing them in turn.  Control is returned to the
  80.      user console only when serious errors occur or when the end of the
  81.      file is met.  Of course, the user may quit out of the
  82.      file-processing by typing control-G at any point.  BATCH files may
  83.      be created using a text editor or by use of the STRINGOUT command.
  84.      Do DESCRIBE(STRINGOUT) for details DESCRIBE(FILE); and
  85.      DESCRIBE(FILES); have additional information on how the file
  86.      argument is interpreted, and files in general.
  87.  
  88.  
  89.  - Variable: BATCHKILL
  90.      default: [FALSE] if TRUE then the effect of all previous BATCH
  91.      files is nullified because a KILL(ALL) and a RESET() will be done
  92.      automatically when the next one is read in.  If BATCHKILL is bound
  93.      to any other atom then a KILL of the value of BATCHKILL will be
  94.      done.
  95.  
  96.  
  97.  - Function: BATCHLOAD (file-specification)
  98.      Batches in the file silently without terminal output or labels.
  99.  
  100.  
  101.  - Function: BATCON (argument)
  102.      continues BATCHing in a file which was interrupted.
  103.  
  104.  
  105.  - Variable: BATCOUNT
  106.      default: [0] may be set to the number of the last expression
  107.      BATCHed in from a file.  Thus BATCON(BATCOUNT-1) will resume
  108.      BATCHing from the expression before the last BATCHed in from
  109.      before.
  110.  
  111.  
  112.  - Variable: BOTHCASES
  113.      default: [TRUE] if TRUE will cause MAXIMA to retain lower case
  114.      text as well as upper case. Note, however, that the names of any
  115.      MAXIMA special variables or functions are in upper case.   The
  116.      default is now TRUE since it makes code more readable, allowing
  117.      users to have names like SeriesSolve.
  118.  
  119.      Because of this we make the system variables and functions all
  120.      upper case, and users may enter them however they like (in upper
  121.      or lower).  But all other variables and functions are case
  122.      sensitive.  When you print out your program using for example
  123.      grind(fundef(f)) then you will see that the symbols like 'IF',
  124.      'SIN',... all appear in upper case whereas non system symbols
  125.      appear in the case which you used.
  126.  
  127.      This is implemented as follows: If the symbol is being encountered
  128.      for the first time, if the upper case version is in the package
  129.      and has a nontrivial function or property list, then the upper
  130.      case symbol is used, and it is recorded on the mixed case one,
  131.      that the upper case should be used in future.  If a symbol is
  132.      already in the package then it is just used.
  133.  
  134.      In effect this means that most old programs should continue to
  135.      work, and that new ones may write sIn, Sin, SIN, sin etc and they
  136.      will all be interpreted as SIN.   However if they write MySin this
  137.      will be different from MYSIN, because MYSIN is not a system
  138.      function or variable.
  139.  
  140.           SeriesSolve(f,x):=
  141.              if (f = sin) ...
  142.           
  143.           and this is read as
  144.           
  145.           SeriesSolve(f,x):=
  146.              IF (f = SIN) ...
  147.  
  148.  
  149.  - Variable: CHANGE_FILEDEFAULTS
  150.      default: [TRUE] on PDP10 systems, and FALSE elsewhere.  Controls
  151.      whether the user doing a LOADFILE or BATCH has his file defaults
  152.      changed to the file LOADFILEd or BATCHed.  The TRUE setting is for
  153.      people who like DDT-style file defaulting.  The FALSE setting is
  154.      for people who like the conventions of other operating systems,
  155.      who like LISP-style file defaulting, or who write packages which
  156.      do LOADFILEs or BATCHes which should not interfere with their
  157.      user's file defaults.
  158.  
  159.  
  160.  - Function: CLOSEFILE (filename1, filename2)
  161.      closes a file opened by WRITEFILE and gives it the name filename1
  162.      filename2.  (On a Lisp Machine one need only say CLOSEFILE();.)
  163.      Thus to save a file consisting of the display of all input and
  164.      output during some part of a session with MACSYMA the user issues
  165.      a WRITEFILE, transacts with MACSYMA, then issues a CLOSEFILE.  The
  166.      user can also issue the PLAYBACK function after a WRITEFILE to
  167.      save the display of previous transactions.  (Note that what is
  168.      saved this way is a copy of the display of expressions not the
  169.      expressions themselves).  To save the actual expression in internal
  170.      form the SAVE function may be used.  The expression can then be
  171.      brought back into MACSYMA via the LOADFILE function.  To save the
  172.      expression in a linear form which may then be BATCHed in later, the
  173.      STRINGOUT function is used.
  174.  
  175.  
  176.  - Function: COLLAPSE (expression)
  177.      collapses" its argument by causing all of its common (i.e. equal)
  178.      subexpressions to share (i.e. use the same cells), thereby saving
  179.      space.  (COLLAPSE is a subroutine used by the OPTIMIZE command.)
  180.      Thus, calling COLLAPSE may be useful before using FASSAVE or after
  181.      loading in a SAVE file.  You can collapse several expressions
  182.      together by using COLLAPSE([expr1,...,exprN])$.  Similarly, you can
  183.      collapse the elements of the array A by doing
  184.      COLLAPSE(LISTARRAY('A))$.
  185.  
  186.  
  187.  - Function: CONCAT (arg1, arg2, ...)
  188.      evaluates its arguments and returns the concatenation of their
  189.      values resulting in a name or a quoted string the type being given
  190.      by that of the first argument.  Thus if X is bound to 1 and D is
  191.      unbound then CONCAT(X,2)="12" and CONCAT(D,X+1)=D2.
  192.  
  193.  
  194.  - Function: SCONCAT (arg1, arg2, ...)
  195.      evaluates its arguments and concatenates them into a string.
  196.      Unlike CONCAT, the arguments do NOT need to be atoms.    The
  197.      result is a Common Lisp String.
  198.           (C5) sconcat("xx[",3,"]:",expand((x+y)^3));
  199.           (D5)              xx[3]:Y^3+3*X*Y^2+3*X^2*Y+X^3
  200.      The resulting string could be used in conjunction with print.
  201.  
  202.  - Variable: CURSORDISP
  203.      default: [TRUE] If TRUE, causes expressions to be drawn by the
  204.      displayer in logical sequence.  This only works with a console
  205.      which can do cursor movement.  If FALSE, expressions are simply
  206.      printed line by line.  CURSORDISP is FALSE when a WRITEFILE is in
  207.      effect.
  208.  
  209.  
  210.  - Variable: DIREC
  211.      - The value of this variable is the default file directory for
  212.      SAVE, STORE, FASSAVE, and STRINGOUT.  It is initialized to the
  213.      user's login name, if he has a disk directory, and to one of the
  214.      USERSi directories otherwise.  DIREC determines to what directory
  215.      disk files will be written.
  216.  
  217.  
  218.  - Function: DISP (expr1,expr2, ...)
  219.      is like DISPLAY but only the value of the arguments are displayed
  220.      rather than equations.  This is useful for complicated arguments
  221.      which don't have names or where only the value of the argument is
  222.      of interest and not the name.
  223.  
  224.  
  225.  - Function: DISPCON (tensor1,tensor2,...)
  226.      displays the contraction properties of the tensori as were given
  227.      to DEFCON.  DISPCON(ALL) displays all the contraction properties
  228.      which were defined.
  229.  
  230.  
  231.  - Function: DISPLAY (expr1, expr2, ...)
  232.      displays equations whose left side is expri unevaluated, and whose
  233.      right side is the value of the expression centered on the line.
  234.      This function is useful in blocks and FOR statements in order to
  235.      have intermediate results displayed.  The arguments to DISPLAY are
  236.      usually atoms, subscripted variables, or function calls.  (see the
  237.      DISP function)
  238.  
  239.           (C1) DISPLAY(B[1,2]);
  240.                                                 2
  241.                                    B     = X - X
  242.                                     1, 2
  243.           (D1)                            DONE
  244.  
  245.  - Variable: DISPLAY2D
  246.      default: [TRUE] - if set to FALSE will cause the standard display
  247.      to be a string (1-dimensional) form rather than a display
  248.      (2-dimensional) form.  This may be of benefit for users on printing
  249.      consoles who would like to conserve paper.
  250.  
  251.  
  252.  - Variable: DISPLAY_FORMAT_INTERNAL
  253.      default: [FALSE] - if set to TRUE will cause expressions to be
  254.      displayed without being transformed in ways that hide the internal
  255.      mathematical representation.  The display then corresponds to what
  256.      the INPART command returns rather than the PART command.  Examples:
  257.           User     PART       INPART
  258.           a-b;      A - B     A + (- 1) B
  259.                      A            - 1
  260.           a/b;       -         A B
  261.                      B
  262.                                  1/2
  263.           sqrt(x);   SQRT(X)    X
  264.                     4 X        4
  265.           X*4/3;    ---        - X
  266.                      3         3
  267.  
  268.  - Function: DISPTERMS (expr)
  269.      displays its argument in parts one below the other.  That is,
  270.      first the operator of 'expr' is displayed, then each term in a
  271.      sum, or factor in a product, or part of a more general expression
  272.      is displayed separately.  This is useful if expr is too large to be
  273.      otherwise displayed.  For example if P1, P2, ...  are very large
  274.      expressions then the display program may run out of storage space
  275.      in trying to display P1+P2+...  all at once.  However,
  276.      DISPTERMS(P1+P2+...) will display P1, then below it P2, etc.  When
  277.      not using DISPTERMS, if an exponential expression is too wide to be
  278.      displayed as A**B it will appear as EXPT(A,B) (or as NCEXPT(A,B) in
  279.      the case of A^^B).
  280.  
  281.  
  282.  - Variable: DSKALL
  283.      default: [] If TRUE will cause values, functions, arrays, and
  284.      rules to be written periodically onto the disk in addition to
  285.      labelled expressions.  TRUE is the default value whereas if DSKALL
  286.      is FALSE then only labelled expresions will be written.
  287.  
  288.  
  289.  - Variable: ERROR_SIZE
  290.      default: [20 for a display terminal, 10 for others].  controls the
  291.      size of error messages.  For example, let
  292.      U:(C^D^E+B+A)/(COS(X-1)+1); .  U has an error size of 24.  So if
  293.      ERROR_SIZE has value < 24 then
  294.           (C1) ERROR("The function", FOO,"doesn't like", U,"as input.");
  295.           prints as:
  296.           The function FOO doesn't like ERREXP1 as input.
  297.           If ERROR_SIZE>24 then as:
  298.                                            E
  299.                                           D
  300.                                          C   + B + A
  301.           The function FOO doesn't like -------------- as input.
  302.                                         COS(X - 1) + 1
  303.  
  304.      Expressions larger than ERROR_SIZE are replaced by symbols, and the
  305.      symbols are set to the expressions.  The symbols are taken from the
  306.      user-settable list
  307.           ERROR_SYMS:[ERREXP1,ERREXP2,ERREXP3]
  308.      .  The default value of this switch might change depending on user
  309.      experience.  If you find the defaults either too big or two small
  310.      for your tastes, send mail to MACSYMA.
  311.  
  312.  
  313.  - Variable: ERROR_SYMS
  314.      default: [ERREXP1,ERREXP2,ERREXP3] - In error messages,
  315.      expressions larger than ERROR_SIZE are replaced by symbols, and the
  316.      symbols are set to the expressions.  The symbols are taken from the
  317.      list ERROR_SYMS, and are initially ERREXP1, ERREXP2, ERREXP3, etc.
  318.      After an error message is printed, e.g. "The function FOO doesn't
  319.      like ERREXP1 as input.", the user can type ERREXP1; to see the
  320.      expression.  ERROR_SYMS may be set by the user to a different set
  321.      of symbols, if desired.
  322.  
  323.  
  324.  - Function: EXPT (A,B)
  325.      if an exponential expression is too wide to be displayed as A^B it
  326.      will appear as EXPT(A,B) (or as NCEXPT(A,B) in the case of A^^B).
  327.  
  328.  
  329.  - Variable: EXPTDISPFLAG
  330.      default: [TRUE] - if TRUE, MACSYMA displays expressions with
  331.      negative exponents using quotients e.g., X**(-1) as 1/X.
  332.  
  333.  
  334.  - Function: FASSAVE (args)
  335.      is similar to SAVE but produces a FASL file in which the sharing
  336.      of subexpressions which are shared in core is preserved in the
  337.      file created.  Hence, expressions which have common subexpressions
  338.      will consume less space when loaded back from a file created by
  339.      FASSAVE rather than by SAVE.  Files created with FASSAVE are
  340.      reloaded using LOADFILE, just as files created with SAVE.  FASSAVE
  341.      returns a list of the form [<name of file>,<size of file in
  342.      blocks>,...] where ...  are the things saved.  Warnings are
  343.      printed out in the case of large files.  FASSAVE may be used while
  344.      a WRITEFILE is in progress.
  345.  
  346.  
  347.  - Function: FILEDEFAULTS ()
  348.      returns the current default filename, in whatever format is used
  349.      by the specific Macsyma implementation.  (See DESCRIBE(FILE) for
  350.      what that format is.)  This is the file specification used by
  351.      LOADFILE, BATCH, and a number of other file-accessing commands.
  352.      FILEDEFAULTS('file) - sets the current filedefaults to "file".  The
  353.      argument to FILEDEFAULTS is evaulated as it is anticipated that the
  354.      command will be used mainly in programs.  The "file" need not be a
  355.      real file, so one can use this function e.g. if one's real purpose
  356.      is to set only the "device" field to something, where one does not
  357.      care about the settings of the other fields.
  358.  
  359.  
  360.  - Variable: FILENAME
  361.      default: [] - The value of this variable is the first name of the
  362.      files which are generated by the automatic disk storage scheme.
  363.      The default value is the first three characters of the user's login
  364.      name concatenated with the lowest unused integer, e.g. ECR1.
  365.  
  366.  
  367.  - Function: FILENAME_MERGE ("filename1","filename2",...)
  368.      ; merges together filenames.  What this means is that it returns
  369.      "filename1" except that missing components come from the
  370.      corresponding components of "filename2", and if they are missing
  371.      there, then from "filename3".
  372.  
  373.  
  374.  - Variable: FILENUM
  375.      default: [0] - The default second file name for files generated by
  376.      SAVE, STRINGOUT, or FASSAVE if no file names are specified by the
  377.      user.  It is an integer, and is incremented by one each time a new
  378.      file is written.
  379.  
  380.  
  381.  - Variable: FILE_SEARCH
  382.      - this is a list of files naming directories to search by LOAD and
  383.      a number of other functions.  The default value of this is a list
  384.      of the various SHARE directories used by Macsyma.
  385.      FILE_SEARCH("filename"); searches on those directories and devices
  386.      specified by the FILE_SEARCH_LISP, FILE_SEARCH_MAXIMA and
  387.      FILE_SEARCH_DEMO variables, and returns the name of the first file
  388.      it finds.  This function is invoked by the LOAD function, which is
  389.      why LOAD("FFT") finds and loads share/fft.mac.  You may add a path
  390.      to the appropriate list.   Note that the format of the paths
  391.      allows specifying multiple extensions and multiple paths.
  392.           "/home/wfs/###.{o,lisp,mac,mc}"
  393.           "/home/{wfs,joe}/###.{o,lisp,mac,mc}"
  394.      The '###' is replaced by the actual filename passed.  File_SEARCH
  395.      first checks if the actual name passed exists, before substituting
  396.      it in the various patterns.
  397.  
  398.  
  399.  - Variable: FILE_STRING_PRINT
  400.      default: [FALSE] on MC, [TRUE] elsewhere.  If TRUE, filenames are
  401.      output as strings; if FALSE, as lists.  For example, the message
  402.      when an out of core file is loaded into MACSYMA (e.g. the LIMIT
  403.      package), appears on MC in list format as   LIMIT FASL DSK MACSYM
  404.      being loaded and in string format as:   DSK:MACSYM;LIMIT FASL
  405.      being loaded The string format is like the top level (DDT) file
  406.      specifications.
  407.  
  408.  
  409.  - Function: FILE_TYPE ("filename")
  410.      ; returns FASL, LISP, or MACSYMA, depending on what kind of file
  411.      it is.  FASL means a compiled Lisp file, which normally has an
  412.      extension of .VAS in NIL.
  413.  
  414.  
  415.  - Function: GRIND (arg)
  416.      prints out arg in a more readable format than the STRING command.
  417.      It returns a D-line as value.  The GRIND switch, default: [FALSE],
  418.      if TRUE will cause the STRING, STRINGOUT, and PLAYBACK commands to
  419.      use "grind" mode instead of "string" mode.  For PLAYBACK, "grind"
  420.      mode can also be turned on (for processing input lines) by
  421.      specifying GRIND as an option.
  422.  
  423.  
  424.  - Variable: IBASE
  425.      default: [10] - the base for inputting numbers.
  426.  
  427.  
  428.  - Variable: INCHAR
  429.      default: [C] - the alphabetic prefix of the names of expressions
  430.      typed by the user.
  431.  
  432.  
  433.  - Function: LDISP (expr1,expr2,...)
  434.      is like DISP but also generates intermediate labels.
  435.  
  436.  
  437.  - Function: LDISPLAY (expr1,expr2,...)
  438.      is like DISPLAY but also generates intermediate labels.
  439.  
  440.  
  441.  - Variable: LINECHAR
  442.      default: [E] - the alphabetic prefix of the names of intermediate
  443.      displayed expressions.
  444.  
  445.  
  446.  - Variable: LINEDISP
  447.      default: [TRUE] - Allows the use of line graphics in the drawing
  448.      of equations on those systems which support them (e.g. the Lisp
  449.      Machine).  This can be disabled by setting LINEDISP to FALSE.  It
  450.      is automatically disabled during WRITEFILE.
  451.  
  452.  
  453.  - Variable: LINEL
  454.      default: [] - the number of characters which are printed on a
  455.      line. It is initially set by MACSYMA to the line length of the
  456.      type of terminal being used (as far as is known) but may be reset
  457.      at any time by the user.  The user may have to reset it in DDT
  458.      with :TCTYP as well.
  459.  
  460.  
  461.  - Function: LOAD ("filename")
  462.      ; takes one argument, a filename represented as a "string" (i.e.
  463.      inside quotation marks), or as list (e.g. inside square brackets),
  464.      and locates and loads in the indicated file.  If no directory is
  465.      specified, it then searches the SHAREi directories and any other
  466.      directories listed in the FILE_SEARCH variable and loads the
  467.      indicated file. LOAD("EIGEN") will load the eigen package without
  468.      the need for the user to be aware of the details of whether the
  469.      package was compiled, translated, saved, or fassaved, i.e. LOAD
  470.      will work on both LOADFILEable and BATCHable files.  Note: LOAD
  471.      will use BATCHLOAD if it finds the file is BATCHable (which means
  472.      that it will BATCH the file in "silently" without terminal output
  473.      or labels).  Other MACSYMA commands to load in files are:
  474.      LOADFILE, RESTORE, BATCH, and DEMO.  Do DESCRIBE(command); for
  475.      details.  LOADFILE and RESTORE work for files written with SAVE;
  476.      BATCH and DEMO for those files written with STRINGOUT or created
  477.      as lists of commands with a text editor.  If load can't find the
  478.      file, check the value FILE_SEARCH to make sure that it contains an
  479.      appropriate template.
  480.  
  481.           (C4) load("eigen");
  482.           MACSYMA BUG: Unknown file type NIL
  483.           
  484.           Error: macsyma error
  485.           Error signalled by MEVAL1.
  486.           Broken at $LOAD.  Type :H for Help.
  487.           MAXIMA>>:q
  488.           
  489.           By examining the file system we find the file is actually in
  490.           /public/maxima/share/eigen.mc.   So we add that to the file_search
  491.           path.   This can be done at start up (see init.lsp) or,
  492.           else it can be done and then the system resaved
  493.           once it has been customized for local directories and pathnames.
  494.           At lisp level we would do
  495.           (in-package "MAXIMA")
  496.           (setq $file_search ($append (list '(mlist)
  497.                   "/tmp/foo.mac" "/tmp/foo.mc") $file_search))
  498.           and at maxima level:
  499.           
  500.           (C5) file_search:append(["/public/maxima/share/foo.mc"],
  501.                   file_search)$
  502.           (C6) load("eigen");
  503.           
  504.           batching /usr/public/maxima/share/eigen.mc
  505.           (D6)                 #/public/maxima/share/eigen.mc
  506.           (C7) eigenvalues(matrix([a,b],[c,d]));
  507.                      2            2
  508.                  - SQRT(D  - 2 A D + 4 B C + A ) + D + A
  509.           (D7) [[---------------------------------------,
  510.                         2
  511.           
  512.                                 2               2
  513.                           SQRT(D  - 2 A D + 4 B C + A ) + D + A
  514.                           -------------------------------------], [1, 1]]
  515.                                     2
  516.  
  517.  - Function: LOADFILE (filename)
  518.      loads a file as designated by its arguments.  This function may be
  519.      used to bring back quantities that were stored from a prior
  520.      MACSYMA session by use of the SAVE or STORE functions.   Specify
  521.      the pathname as on your operating system.  For unix this would be
  522.      "/home/wfs/foo.mc" for example.
  523.  
  524.  
  525.  - Variable: LOADPRINT
  526.      default: [TRUE] - governs the printing of messages accompanying
  527.      loading of files.  The following options are available: TRUE means
  528.      always print the message; 'LOADFILE means print only when the
  529.      LOADFILE command is used; 'AUTOLOAD means print only when a file
  530.      is automatically loaded in (e.g. the integration file SIN FASL);
  531.      FALSE means never print the loading message.
  532.  
  533.  
  534.  - Function: NOSTRING (arg)
  535.      displays all input lines when playing back rather than STRINGing
  536.      them.  If arg is GRIND then the display will be in a more readable
  537.      format.  One may include any number of options as in
  538.      PLAYBACK([5,10],20,TIME,SLOW).
  539.  
  540.  
  541.  - Variable: OBASE
  542.      default: [10] the base for display of numbers.
  543.  
  544.  
  545.  - Variable: OUTCHAR
  546.      default: [D] - the alphabetic prefix of the names of outputted
  547.      expressions.
  548.  
  549.  
  550.  - Variable: PACKAGEFILE
  551.      default:[FALSE] - Package designers who use SAVE, FASSAVE, or
  552.      TRANSLATE to create packages (files) for others to use may want to
  553.      set PACKAGEFILE:TRUE$ to prevent information from being added to
  554.      MACSYMA's information-lists (e.g. VALUES, FUNCTIONS) except where
  555.      necessary when the file is loaded in.  In this way, the contents
  556.      of the package will not get in the user's way when he adds his own
  557.      data.  Note that this will not solve the problem of possible name
  558.      conflicts.  Also note that the flag simply affects what is output
  559.      to the package file.  Setting the flag to TRUE is also useful for
  560.      creating MACSYMA init files.
  561.  
  562.  
  563.  - Variable: PARSEWINDOW
  564.      default:[10] - the maximum number of "lexical tokens" that are
  565.      printed out on each side of the error-point when a syntax
  566.      (parsing) error occurs.  This option is especially useful on slow
  567.      terminals.  Setting it to -1 causes the entire input string to be
  568.      printed out when an error occurs.
  569.  
  570.  
  571.  - Variable: PFEFORMAT
  572.      default: [FALSE] - if TRUE will cause rational numbers to display
  573.      in a linear form and denominators which are integers to display as
  574.      rational number multipliers.
  575.  
  576.  
  577.  - Function: PRINT (exp1, exp2, ...)
  578.      evaluates and displays its arguments one after the other "on a
  579.      line" starting at the leftmost position.  If expi is unbound or is
  580.      preceded by a single quote or is enclosed in "s then it is printed
  581.      literally.  For example, PRINT("THE VALUE OF X IS ",X).  The value
  582.      returned by PRINT is the value of its last argument.  No
  583.      intermediate lines are generated.  (For "printing" files, see the
  584.      PRINTFILE function.)
  585.  
  586.  
  587.  - Function: SPRINT (exp1, exp2, ...)
  588.      evaluates and displays its arguments one after the other "on a
  589.      line" starting at the leftmost position.  The numbers are printed
  590.      with the '-' right next to the number, and it disregards line
  591.      length.
  592.  
  593.  - Function: TCL_OUTPUT (LIST INDEX &optional-skip)
  594.      prints a TCL list based on LIST extracting the INDEX slot.  Here
  595.      skip defaults to 2, meaning that every other element will be
  596.      printed if the argument is of the form a list of numbers, rathter
  597.      than a list of lists.  For example:
  598.           TCL_OUTPUT([x1,y1,x2,y2,x3,y3],1) --> {x1 x2 x3 }
  599.           TCL_OUTPUT([x1,y1,x2,y2,x3,y3],2) --> {y1 y2 y3 }
  600.           TCL_OUTPUT([1,2,3,4,5,6],1,3) --> {1 4}
  601.           TCL_OUTPUT([1,2,3,4,5,6],2,3) --> {2 5}
  602.  
  603.  - Function: READ (string1, ...)
  604.      prints its arguments, then reads in and evaluates one expression.
  605.      For example: A:READ("ENTER THE NUMBER OF VALUES").
  606.  
  607.  
  608.  - Function: READONLY (string1,...)
  609.      prints its arguments, then reads in an expression (which in
  610.      contrast to READ is not evaluated).
  611.  
  612.  
  613.  - Function: REVEAL (exp,depth)
  614.      will display exp to the specified integer depth with the length of
  615.      each part indicated.  Sums will be displayed as Sum(n) and
  616.      products as Product(n) where n is the number of subparts of the
  617.      sum or product.  Exponentials will be displayed as Expt.
  618.           (C1) INTEGRATE(1/(X^3+2),X)$
  619.           (C2) REVEAL(%,2);
  620.           (D2)                    Negterm + Quotient + Quotient
  621.           (C3) REVEAL(D1,3);
  622.                                                ATAN         LOG
  623.           (D3)                 - Quotient + ---------- + ----------
  624.                                             Product(2)   Product(2)
  625.  
  626.  - Variable: RMXCHAR
  627.      default: []] - The character used to display the (right) delimiter
  628.      of a matrix (see also LMXCHAR).
  629.  
  630.  
  631.  - Function: SAVE (filename,arg1, arg2,...,argi)
  632.      saves quantities described by its arguments on disk and keeps them
  633.      in core also.  The arg's are the expressions to be SAVEd.  ALL is
  634.      the simplest, but note that saving ALL will save the entire
  635.      contents of your MACSYMA, which in the case of a large computation
  636.      may result in a large file.  VALUES, FUNCTIONS, or any other items
  637.      on the INFOLISTS (do DESCRIBE(INFOLISTS); for the list) may be
  638.      SAVEd, as may functions and variables by name.  C and D lines may
  639.      also be saved, but it is better to give them explicit names, which
  640.      may be done in the command line, e.g.  SAVE(RES1=D15); Files saved
  641.      with SAVE should be reloaded with LOADFILE.  SAVE returns the
  642.      pathname where the items were saved.
  643.  
  644.  
  645.  - Variable: SAVEDEF
  646.      default: [TRUE] - if TRUE will cause the MACSYMA version of a user
  647.      function to remain when the function is TRANSLATEd.  This permits
  648.      the definition to be displayed by DISPFUN and allows the function
  649.      to be edited.  If SAVEDEF is FALSE, the names of translated
  650.      functions are removed from the FUNCTIONS list.
  651.  
  652.  
  653.  - Function: SHOW (exp)
  654.      will display exp with the indexed objects in it shown having
  655.      covariant indices as subscripts,contravariant indices as
  656.      superscripts.  The derivative indices will be displayed as
  657.      subscripts, separated from the covariant indices by a comma.
  658.  
  659.  
  660.  - Function: SHOWRATVARS (exp)
  661.      returns a list of the RATVARS (CRE variables) of exp.
  662.  
  663.  
  664.  - Variable: STARDISP
  665.      default: [FALSE] - if TRUE will cause multiplication to be
  666.      displayed explicitly with an * between operands.
  667.  
  668.  
  669.  - Function: STRING (expr)
  670.      converts expr to MACSYMA's linear notation (similar to FORTRAN's)
  671.      just as if it had been typed in and puts expr into the buffer for
  672.      possible editing (in which case expr is usually Ci) The STRING'ed
  673.      expression should not be used in a computation.
  674.  
  675.  
  676.  - Function: STRINGOUT (args)
  677.      will output an expression to a file in a linear format.  Such
  678.      files are then used by the BATCH or DEMO commands.
  679.      STRINGOUT(file-specification, A1, A2, ...)  outputs to a file
  680.      given by file-specification ([filename1,filename2,DSK, directory])
  681.      the values given by A1,A2,..  in a MACSYMA readable format.  The
  682.      file-specification may be omitted, in which case the default values
  683.      will be used. The Ai are usually C labels or may be INPUT meaning
  684.      the value of all C labels.  Another option is to make ai FUNCTIONS
  685.      which will cause all of the user's function definitions to be
  686.      strungout (i.e. all those retrieved by DISPFUN(ALL)).  Likewise
  687.      the ai may be VALUES, and all the variables to which the user has
  688.      assigned values will be strungout.  ai may also be a list [m,n]
  689.      which means to stringout all labels in the range m through n
  690.      inclusive.  This function may be used to create a file of FORTRAN
  691.      statements by doing some simple editing on the strungout
  692.      expressions.  If the GRIND switch is set to TRUE, then STRINGOUT
  693.      will use GRIND format instead of STRING format.  Note: a STRINGOUT
  694.      may be done while a WRITEFILE is in progress.
  695.  
  696.  
  697.  - Function: TEX (expr)
  698.  - Function: TEX (expr,filename)
  699.  - Function: TEX (label,filename)
  700.      In the case of a label, a left-equation-number will be produced.
  701.      in case a file-name is supplied, the output will be appended to the
  702.      file.
  703.  
  704.           (C1) integrate(1/(1+x^3),x);
  705.           
  706.                                2 x - 1
  707.                          2        ATAN(-------)
  708.                     LOG(x  - x + 1)     SQRT(3)    LOG(x + 1)
  709.           (D1)             - --------------- + ------------- + ----------
  710.                        6           SQRT(3)            3
  711.           (C2) tex(d1);
  712.           
  713.           $$-{{\log \left(x^{2}-x+1\right)}\over{6}}
  714.             +{{\arctan {{2\>x-1}\over{\sqrt{3}}}}\over{\sqrt{3}}}
  715.             +{{\log \left(x+1\right)}\over{3}}\leqno{\tt (D1)}$$
  716.           (D2)                      (D1)
  717.           (C6) tex(integrate(sin(x),x));
  718.           
  719.           $$-\cos x$$
  720.           (D6)                      FALSE
  721.           (C7) tex(d1,"/tmp/jo.tex");
  722.           
  723.           (D7)                      (D1)
  724.      where the last expression will be appended to the file
  725.      `/tmp/jo.tex'
  726.  
  727.  - Function: SYSTEM (command)
  728.      Execute COMMAND as a subprocess.  The command will be passed to the
  729.      default shell for execution.   System is not supported by all
  730.      operating systems, but generally exists in the unix environment.
  731.      if hist is a list of frequencies which you wish to plot as a bar
  732.      graph using xgraph.
  733.           (C1) (with_stdout("_hist.out",
  734.                      for i:1 thru length(hist) do (
  735.                        print(i,hist[i]))),
  736.                  system("xgraph -bar -brw .7 -nl < _hist.out"));
  737.      In order to make the plot be done in the background (returning
  738.      control to maxima) and remove the temporary file after it is done
  739.      do:
  740.           system("(xgraph -bar -brw .7 -nl < _hist.out;  rm -f _hist.out)&")
  741.  
  742.  - Variable: TTYOFF
  743.      default: [FALSE] - if TRUE stops printing output to the console.
  744.  
  745.  
  746.  - macro: WITH_STDOUT (file,stmt1,stmt2,...)
  747.      Opens file and then evaluates stmt1, stmt2, ....  Any printing to
  748.      standard output goes to the file instead of the terminal.  It
  749.      always returns FALSE.   Note the binding of display2d to be false,
  750.      otherwise the printing will have things like "- 3" instead of "-3".
  751.  
  752.           mygnuplot(f,var,range,number_ticks):=
  753.            block([numer:true,display2d:false],
  754.            with_stdout("/tmp/gnu",
  755.              for x:range[1] thru range[2] step
  756.                           (range[2]-range[1])/number_ticks
  757.                 do (print(x,at(f,var=x)))),
  758.            system("echo \"set data style lines; set title '",
  759.                   f,"' ;plot '/tmp/gnu'
  760.           ;pause 10 \" | gnuplot"));
  761.           
  762.           (C8) with_stdout("/home/wfs/joe",
  763.                 n:10,
  764.                 for i:8 thru n
  765.                   do(print("factorial(",i,") gives ",i!)));
  766.           (D8)                      FALSE
  767.           (C9) system("cat /home/wfs/joe");
  768.           factorial( 8 ) gives  40320
  769.           factorial( 9 ) gives  362880
  770.           factorial( 10 ) gives  3628800
  771.           (D9)                        0
  772.  
  773.  
  774.  - Function: WRITEFILE (DSK, directory)
  775.      opens up a file for writing.  On a Lisp Machine one uses
  776.      WRITEFILE("filename").  All interaction between the user and
  777.      MACSYMA is then recorded in this file, just as it is on the
  778.      console.  Such a file is a transcript of the session, and is not
  779.      reloadable or batchable into MACSYMA again.  (See also CLOSEFILE.)
  780.  
  781.  
  782. 
  783. File: maxima.info,  Node: Floating Point,  Next: Contexts,  Prev: Input and Output,  Up: Top
  784.  
  785. Floating Point
  786. **************
  787.  
  788. * Menu:
  789.  
  790. * Definitions for Floating Point::
  791.  
  792. 
  793. File: maxima.info,  Node: Definitions for Floating Point,  Prev: Floating Point,  Up: Floating Point
  794.  
  795. Definitions for Floating Point
  796. ==============================
  797.  
  798.  - Function: BFFAC (exp,n)
  799.      BFLOAT version of the Factorial (shifted Gamma) function.  The 2nd
  800.      argument is how many digits to retain and return, it's a good idea
  801.      to request a couple of extra.  This function is available by doing
  802.      LOAD(BFFAC); .
  803.  
  804.  - Variable: ALGEPSILON
  805.      The default value is 10^-8.  The value of ALGEPSILON is used by
  806.      ALGSYS.
  807.  
  808.  - Function: BFLOAT (X)
  809.      converts all numbers and functions of numbers to bigfloat numbers.
  810.      Setting FPPREC[16] to N, sets the bigfloat precision to N digits.
  811.      If FLOAT2BF[FALSE] is FALSE a warning message is printed when a
  812.      floating point number is converted into a bigfloat number (since
  813.      this may lead to loss of precision).
  814.  
  815.  
  816.  - Function: BFLOATP (exp)
  817.      is TRUE if exp is a bigfloat number else FALSE.
  818.  
  819.  
  820.  - Function: BFPSI (n,z,fpprec)
  821.      gives polygammas of real arg and integer order.  For digamma,
  822.      BFPSI0(z,fpprec) is more direct.  Note -BFPSI0(1,fpprec) provides
  823.      BFLOATed %GAMMA.  To use this do LOAD(BFFAC);
  824.  
  825.  
  826.  - Variable: BFTORAT
  827.      default: [FALSE] controls the conversion of bfloats to rational
  828.      numbers.  If
  829.           BFTORAT:FALSE
  830.      RATEPSILON will be used to control the conversion (this results in
  831.      relatively small rational numbers).  If
  832.           BFTORAT:TRUE
  833.      , the rational number generated will accurately represent the
  834.      bfloat.
  835.  
  836.  
  837.  - Variable: BFTRUNC
  838.      default: [TRUE] causes trailing zeroes in non-zero bigfloat
  839.      numbers not to be displayed.  Thus, if BFTRUNC:FALSE, BFLOAT(1);
  840.      displays as 1.000000000000000B0. Otherwise, this is displayed as
  841.      1.0B0.
  842.  
  843.  
  844.  - Function: CBFAC (z,fpprec)
  845.      a factorial for complex bfloats.  It may be used by doing
  846.      LOAD(BFAC); For more details see share2/bfac.usg.
  847.  
  848.  
  849.  - Function: FLOAT (exp)
  850.      converts integers, rational numbers and bigfloats in exp to
  851.      floating point numbers.  It is also an EVFLAG, FLOAT causes
  852.      non-integral rational numbers and bigfloat numbers to be converted
  853.      to floating point.
  854.  
  855.  
  856.  - Variable: FLOAT2BF
  857.      default: [FALSE] if FALSE, a warning message is printed when a
  858.      floating point number is converted into a bigfloat number (since
  859.      this may lead to loss of precision).
  860.  
  861.  
  862.  - Function: FLOATDEFUNK
  863.      - is a utility for making floating point functions from
  864.      mathematical expression. It will take the input expression and
  865.      FLOAT it, then OPTIMIZE it, and then insert MODE_DECLAREations for
  866.      all the variables.  This is THE way to use ROMBERG, PLOT2,
  867.      INTERPOLATE, etc. e.g.  EXP:some-hairy-macsyma-expression;
  868.  
  869.           FLOATDEFUNK('F,['X],EXP);
  870.      will define the function F(X) for you.  (Do
  871.      PRINTFILE(MCOMPI,DOC,MAXDOC); for more details.)
  872.  
  873.  
  874.  - Function: FLOATNUMP (exp)
  875.      is TRUE if exp is a floating point number else FALSE.
  876.  
  877.  
  878.  - Variable: FPPREC
  879.      default: [16] - Floating Point PRECision.  Can be set to an
  880.      integer representing the desired precision.
  881.  
  882.  
  883.  - Variable: FPPRINTPREC
  884.      default: [0] - The number of digits to print when printing a
  885.      bigfloat number, making it possible to compute with a large number
  886.      of digits of precision, but have the answer printed out with a
  887.      smaller number of digits.  If FPPRINTPREC is 0 (the default), or >=
  888.      FPPREC, then the value of FPPREC controls the number of digits used
  889.      for printing.  However, if FPPRINTPREC has a value between 2 and
  890.      FPPREC-1, then it controls the number of digits used.  (The minimal
  891.      number of digits used is 2, one to the left of the point and one to
  892.      the right.  The value 1 for FPPRINTPREC is illegal.)
  893.  
  894.  - Function: ?ROUND (x,&optional-divisor)
  895.      round the floating point X to the nearest integer.   The argument
  896.      must be a regular system float, not a bigfloat.   The ? beginning
  897.      the name indicates this is normal common lisp function.
  898.  
  899.           (C3) ?round(-2.8);
  900.           (D3)                       - 3
  901.  
  902.  - Function: ?TRUNCATE (x,&optional-divisor)
  903.      truncate the floating point X towards 0, to become an integer.
  904.      The argument must be a regular system float, not a bigfloat.  The
  905.      ? beginning the name indicates this is normal common lisp function.
  906.  
  907.      (C4) ?truncate(-2.8);
  908.      (D4)                       - 2
  909.      (C5) ?truncate(2.4);
  910.      (D5)                        2
  911.      (C6) ?truncate(2.8);
  912.      (D6)                        2
  913.  
  914.  - Variable: ZUNDERFLOW
  915.      default: [TRUE] - if FALSE, an error will be signaled if floating
  916.      point underflow occurs.  Currently in NIL Macsyma, all
  917.      floating-point underflow, floating-point overflow, and
  918.      division-by-zero errors signal errors, and this switch is ignored.
  919.  
  920.  
  921. 
  922. File: maxima.info,  Node: Contexts,  Next: Polynomials,  Prev: Floating Point,  Up: Top
  923.  
  924. Contexts
  925. ********
  926.  
  927. * Menu:
  928.  
  929. * Definitions for Contexts::
  930.  
  931. 
  932. File: maxima.info,  Node: Definitions for Contexts,  Prev: Contexts,  Up: Contexts
  933.  
  934. Definitions for Contexts
  935. ========================
  936.  
  937.  - Function: ACTIVATE (cont1, cont2, ...)
  938.      causes the specified contexts conti to be activated.  The facts in
  939.      these contexts are used in making deductions and retrieving
  940.      information.  The facts in these contexts are not listed when
  941.      FACTS(); is done.  The variable ACTIVECONTEXTS is the list of
  942.      contexts which are active by way of the ACTIVATE function.
  943.  
  944.  
  945.  - Variable: ACTIVECONTEXTS
  946.      default: [] is a list of the contexts which are active by way of
  947.      the ACTIVATE function, as opposed to being active because they are
  948.      subcontexts of the current context.
  949.  
  950.  
  951.  - Function: ASSUME (pred1, pred2, ...)
  952.      First checks the specified predicates for redundancy and
  953.      consistency with the current data base.  If the predicates are
  954.      consistent and non-redundant, they are added to the data base; if
  955.      inconsistent or redundant, no action is taken.  ASSUME returns a
  956.      list whose entries are the predicates added to the data base and
  957.      the atoms REDUNDANT or INCONSISTENT where applicable.
  958.  
  959.  
  960.  - Variable: ASSUMESCALAR
  961.      default: [TRUE] - helps govern whether expressions `exp' for which
  962.  
  963.           NONSCALARP(exp) is FALSE
  964.  
  965.      are assumed to behave like scalars for certain transformations as
  966.      follows: Let `exp' represent any non-list/non-matrix, and
  967.      `[1,2,3]' any list or matrix.
  968.           exp.[1,2,3]; ==>
  969.            [exp,2*exp,3*exp]
  970.      if ASSUMESCALAR is TRUE or SCALARP(exp) is TRUE or CONSTANTP(exp)
  971.      is TRUE.  If ASSUMESCALAR is TRUE, such expressions will behave
  972.      like scalars only for the commutative operators, but not for ".".
  973.      If ASSUMESCALAR is FALSE, such expressions will behave like
  974.      non-scalars.  If ASSUMESCALAR is ALL, such expressions will behave
  975.      like scalars for all the operators listed above.
  976.  
  977.  - Variable: ASSUME_POS
  978.      default:[FALSE] - When using INTEGRATE, etc. one often introduces
  979.      parameters which are real and positive or one's calculations can
  980.      often be constructed so that this is true.  There is a switch
  981.      ASSUME_POS (default FALSE) such that if set to TRUE, MACSYMA will
  982.      assume one's parameters are positive.  The intention here is to
  983.      cut down on the number of questions MACSYMA needs to ask.
  984.      Obviously, ASSUME information or any contextual information
  985.      present will take precedence.  The user can control what is
  986.      considered to be a parameter for this purpose.  Parameters by
  987.      default are those which satisfy SYMBOLP(x) OR SUBVARP(x).  The
  988.      user can change this by setting the option ASSUME_POS_PRED
  989.      [default FALSE] to the name of a predicate function of one
  990.      argument.  E.g. if you want only symbols to be parameters, you can
  991.      do ASSUME_POS:TRUE$ ASSUME_POS_PRED:'SYMBOLP$ SIGN(A); -> POS,
  992.      SIGN(A[1]); -> PNZ.
  993.  
  994.  - Variable: ASSUME_POS_PRED
  995.      default:[FALSE] - may be set to one argument to control what will
  996.      be considered a parameter for the "assumptions" that INTEGRATE
  997.      will make... see ASSUME and ASSUME_POS .
  998.  
  999.  - Variable: CONTEXT
  1000.      default: INITIAL. Whenever a user assumes a new fact, it is placed
  1001.      in the context named as the current value of the variable CONTEXT.
  1002.      Similarly, FORGET references the current value of CONTEXT.  To
  1003.      change contexts, simply bind CONTEXT to the desired context.  If
  1004.      the specified context does not exist it will be created by an
  1005.      invisible call to NEWCONTEXT.  The context specified by the value
  1006.      of CONTEXT is automatically activated.  (Do DESCRIBE(CONTEXTS);
  1007.      for a general description of the CONTEXT mechanism.)
  1008.  
  1009.  
  1010.  - Variable: CONTEXTS
  1011.      default: [INITIAL,GLOBAL] is a list of the contexts which
  1012.      currently exist, including the currently active context.  The
  1013.      context mechanism makes it possible for a user to bind together
  1014.      and name a selected portion of his data base, called a context.
  1015.      Once this is done, the user can have MACSYMA assume or forget
  1016.      large numbers of facts merely by activating or deactivating their
  1017.      context.  Any symbolic atom can be a context, and the facts
  1018.      contained in that context will be retained in storage until the
  1019.      user destroys them individually by using FORGET or destroys them
  1020.      as a whole by using KILL to destroy the context to which they
  1021.      belong.      Contexts exist in a formal hierarchy, with the root
  1022.      always being the context GLOBAL, which contains information about
  1023.      MACSYMA that some functions need.  When in a given context, all
  1024.      the facts in that context are "active" (meaning that they are used
  1025.      in deductions and retrievals) as are all the facts in any context
  1026.      which is an inferior of that context.  When a fresh MACSYMA is
  1027.      started up, the user is in a context called INITIAL, which has
  1028.      GLOBAL as a subcontext.  The functions which deal with contexts
  1029.      are: FACTS, NEWCONTEXT, SUPCONTEXT, KILLCONTEXT, ACTIVATE,
  1030.      DEACTIVATE, ASSUME, and FORGET.
  1031.  
  1032.  
  1033.  - Function: DEACTIVATE (cont1, cont2, ...)
  1034.      causes the specified contexts conti to be deactivated.
  1035.  
  1036.  
  1037.  - Function: FACTS (item)
  1038.      If 'item' is the name of a context then FACTS returns a list of
  1039.      the facts in the specified context.  If no argument is given, it
  1040.      lists the current context.  If 'item' is not the name of a context
  1041.      then it returns a list of the facts known about 'item' in the
  1042.      current context.  Facts that are active, but in a different
  1043.      context, are not listed.
  1044.  
  1045.  
  1046.  - declaration: FEATURES
  1047.      - MACSYMA has built-in properties which are handled by the data
  1048.      base.  These are called FEATURES.  One can do DECLARE(N,INTEGER),
  1049.      etc.  One can also DECLARE one's own FEATURES by e.g.  DECLARE(
  1050.      INCREASING, FEATURE); which will then allow one to say DECLARE(F,
  1051.      INCREASING);.  One can then check if F is INCREASING by using the
  1052.      predicate FEATUREP via FEATUREP(F, INCREASING).  There is an
  1053.      infolist FEATURES which is a list of known FEATURES.  At present
  1054.      known FEATURES are: INTEGER, NONINTEGER, EVEN, ODD, RATIONAL,
  1055.      IRRATIONAL, REAL, IMAGINARY, COMPLEX, ANALYTIC, INCREASING,
  1056.      DECREASING, ODDFUN, EVENFUN, POSFUN, COMMUTATIVE, LASSOCIATIVE,
  1057.      RASSOCIATIVE, SYMMETRIC, and ANTISYMMETRIC.  [Note: system
  1058.      "features" may be checked with STATUS(FEATURE, ...); See
  1059.      DESCRIBE(STATUS); or DESCRIBE(FEATURE); for details.]
  1060.  
  1061.  
  1062.  - Function: FORGET (pred1, pred2, ...)
  1063.      removes relations established by ASSUME.  The predicates may be
  1064.      expressions equivalent to (but not necessarily identical to) those
  1065.      previously ASSUMEd.  FORGET(list) is also a legal form.
  1066.  
  1067.  
  1068.  - Function: KILLCONTEXT (context1,context2,...,contextn)
  1069.      kills the specified contexts.  If one of them is the current
  1070.      context, the new current context will become the first available
  1071.      subcontext of the current context which has not been killed.  If
  1072.      the first available unkilled context is GLOBAL then INITIAL is
  1073.      used instead.  If the INITIAL context is killed, a new INITIAL is
  1074.      created, which is empty of facts.  KILLCONTEXT doesn't allow the
  1075.      user to kill a context which is currently active, either because
  1076.      it is a subcontext of the current context, or by use of the
  1077.      function ACTIVATE.
  1078.  
  1079.  
  1080.  - Function: NEWCONTEXT (name)
  1081.      creates a new (empty) context, called name, which has GLOBAL as
  1082.      its only subcontext.  The new context created will become the
  1083.      currently active context.
  1084.  
  1085.  
  1086.  - Function: SUPCONTEXT (name,context)
  1087.      will create a new context (called name) whose subcontext is
  1088.      context.  If context is not specified, the current context will be
  1089.      assumed.  If it is specified, context must exist.
  1090.  
  1091.  
  1092. 
  1093. File: maxima.info,  Node: Polynomials,  Next: Constants,  Prev: Contexts,  Up: Top
  1094.  
  1095. Polynomials
  1096. ***********
  1097.  
  1098. * Menu:
  1099.  
  1100. * Introduction to Polynomials::
  1101. * Definitions for Polynomials::
  1102.  
  1103. 
  1104. File: maxima.info,  Node: Introduction to Polynomials,  Next: Definitions for Polynomials,  Prev: Polynomials,  Up: Polynomials
  1105.  
  1106. Introduction to Polynomials
  1107. ===========================
  1108.  
  1109.    Polynomials are stored in maxima either in General Form or as
  1110. Cannonical Rational Expressions (CRE) form.  The latter is a standard
  1111. form, and is used internally by operations such as factor, ratsimp, and
  1112. so on.
  1113.  
  1114.    Canonical Rational Expressions constitute a kind of representation
  1115. which is especially suitable for expanded polynomials and rational
  1116. functions (as well as for partially factored polynomials and rational
  1117. functions when RATFAC[FALSE] is set to TRUE).  In this CRE form an
  1118. ordering of variables (from most to least main) is assumed for each
  1119. expression.  Polynomials are represented recursively by a list
  1120. consisting of the main variable followed by a series of pairs of
  1121. expressions, one for each term of the polynomial.  The first member of
  1122. each pair is the exponent of the main variable in that term and the
  1123. second member is the coefficient of that term which could be a number or
  1124. a polynomial in another variable again represented in this form.  Thus
  1125. the principal part of the CRE form of 3*X^2-1 is (X 2 3 0 -1) and that
  1126. of 2*X*Y+X-3 is (Y 1 (X 1 2) 0 (X 1 1 0 -3)) assuming Y is the main
  1127. variable, and is (X 1 (Y 1 2 0 1) 0 -3) assuming X is the main
  1128. variable. "Main"-ness is usually determined by reverse alphabetical
  1129. order.  The "variables" of a CRE expression needn't be atomic.  In fact
  1130. any subexpression whose main operator is not + - * / or ^ with integer
  1131. power will be considered a "variable" of the expression (in CRE form) in
  1132. which it occurs.  For example the CRE variables of the expression
  1133. X+SIN(X+1)+2*SQRT(X)+1 are X, SQRT(X), and SIN(X+1).  If the user does
  1134. not specify an ordering of variables by using the RATVARS function
  1135. MACSYMA will choose an alphabetic one.  In general, CRE's represent
  1136. rational expressions, that is, ratios of polynomials, where the
  1137. numerator and denominator have no common factors, and the denominator is
  1138. positive.  The internal form is essentially a pair of polynomials (the
  1139. numerator and denominator) preceded by the variable ordering list.  If
  1140. an expression to be displayed is in CRE form or if it contains any
  1141. subexpressions in CRE form, the symbol /R/ will follow the line label.
  1142. See the RAT function for converting an expression to CRE form.  An
  1143. extended CRE form is used for the representation of Taylor series.  The
  1144. notion of a rational expression is extended so that the exponents of the
  1145. variables can be positive or negative rational numbers rather than just
  1146. positive integers and the coefficients can themselves be rational
  1147. expressions as described above rather than just polynomials.  These are
  1148. represented internally by a recursive polynomial form which is similar
  1149. to and is a generalization of CRE form, but carries additional
  1150. information such as the degree of truncation.  As with CRE form, the
  1151. symbol /T/ follows the line label of such expressions.
  1152.  
  1153.